package cn.changein.framework.service.setting.client;

import cn.changein.framework.base.pojo.page.PageInfo;
import cn.changein.framework.kernel.model.response.ResponseData;
import cn.changein.framework.model.setting.client.entity.Client;
import cn.changein.framework.model.setting.client.model.params.ClientParam;
import cn.changein.framework.model.setting.client.model.result.ClientResult;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 客户 服务类
 * </p>
 *

 * @Date 2020-11-02
 * @Copyright: companyName
 * @Version 1.0
 * @Since JDK1.8
 */
public interface ClientService extends IService<Client> {

    /**
     * 新增
     *

     * @Date 2020-11-02
     */
    ResponseData add(ClientParam param);

    /**
     * 删除
     *

     * @Date 2020-11-02
     */
    ResponseData delete(ClientParam param);

    /**
     * 更新
     *

     * @Date 2020-11-02
     */
    ResponseData update(ClientParam param);

    /**
     * 查询单条数据，Specification模式
     *

     * @Date 2020-11-02
     */
    ClientResult findBySpec(ClientParam param);

    /**
     * 查询列表，Specification模式
     *

     * @Date 2020-11-02
     */
    List<ClientResult> findListBySpec(ClientParam param);

    /**
     * 查询分页数据，Specification模式
     *

     * @Date 2020-11-02
     */
    PageInfo findPageBySpec(ClientParam param);

    /**
     * 启用/禁用
     *
     * @param clientParam
     * @return

     * @Date 2020-11-03
     */
    ResponseData updateState(ClientParam clientParam);

    /**
     * 审核/反审核
     *
     * @param clientParam
     * @return

     * @Date 2020-10-29
     */
    ResponseData updateAudit(ClientParam clientParam);

    /**
     * 批量删除
     *
     * @param clientParam
     * @return
     */
    ResponseData deleteList(ClientParam clientParam);

    /**
     * 导出Excel表格
     *
     * @param clientParam
     * @param response
     */
    void exportBusinessUnit(ClientParam clientParam, HttpServletResponse response);

    ResponseData importExcel(MultipartFile file);

    /**
     * 更新引用次数
     *

     * @Date 2020-10-31
     */
    void updateQuotedCount(Long id, Integer quotedCount);
}
